Skip to content

feat: add --retries / PACT_BROKER_HTTP_RETRIES to pact_verifier_cli - #534

Merged
rholshausen merged 4 commits into
masterfrom
feat/verifier-cli-retries
May 27, 2026
Merged

feat: add --retries / PACT_BROKER_HTTP_RETRIES to pact_verifier_cli#534
rholshausen merged 4 commits into
masterfrom
feat/verifier-cli-retries

Conversation

@JP-Ellis

Copy link
Copy Markdown
Member

Exposes broker HTTP retry count as --retries (env: PACT_BROKER_HTTP_RETRIES,
default: 8) in pact_verifier_cli, matching the flag in pact-broker-cli.

The retry count is threaded through VerificationOptions.broker_request_retries into the HALClient used for all broker calls: pact fetching (both legacy and dynamic) and publishing verification results.

pact_verifier and cli bumped to 1.4.0

@JP-Ellis
JP-Ellis force-pushed the feat/verifier-cli-retries branch from 1b58c1a to 3c0d4e8 Compare May 26, 2026 07:20
@rholshausen

Copy link
Copy Markdown
Contributor

pact_verifier and cli bumped to 1.4.0

Such a tiny change for a version bump?

@JP-Ellis

Copy link
Copy Markdown
Member Author

The main thing here is a new flag, hence the new minor version.

Technically, there's a breaking change (the typo fix is part of the public interface...).

Up to you what version bump you prefer. I can fix up this PR easily.

@rholshausen

Copy link
Copy Markdown
Contributor

Ok, I've reset the version on the CLI but kept the version bump for the verifier crate.

@rholshausen

Copy link
Copy Markdown
Contributor

There is a failing test, as the error text has now changed:

'pact_broker::tests::fetch_returns_an_error_if_it_does_not_get_a_valid_hal_response' (10134) panicked at pact_verifier/src/pact_broker.rs:1365:9:
assertion failed: `(left == right)`

Diff < left / right > :
<Error with the content of a HAL resource - Did not get a valid HAL response body from pact broker path '/nonhal' - error decoding response body. URL: 'http://127.0.0.1:43399/'
>Error with the content of a HAL resource - Did not get a valid HAL response body from pact broker path '/nonhal' - error decoding response body for url (
http://127.0.0.1:43399/nonhal
)
. URL: 'http://127.0.0.1:43399/'

JP-Ellis added 4 commits May 27, 2026 14:39
Exposes broker HTTP retry count as --retries (env: PACT_BROKER_HTTP_RETRIES,
default: 8) in pact_verifier_cli, matching the flag in pact-broker-cli.

The retry count is threaded through VerificationOptions.broker_request_retries
into the HALClient used for all broker calls: pact fetching (both legacy and
dynamic) and publishing verification results.

pact_verifier and cli bumped to 1.4.0

Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
@JP-Ellis
JP-Ellis force-pushed the feat/verifier-cli-retries branch from 2709b4c to 27a6872 Compare May 27, 2026 05:22
@JP-Ellis

Copy link
Copy Markdown
Member Author

Couldn't be bothered dealing with the merge commit when I rebased... so it clobbered the git history. Anyway, error is fixed, kept the minor version bump for the pact_verifier breaking change, and reverted the version bump for the pact_verifier_cli.

@rholshausen
rholshausen merged commit a57ae0e into master May 27, 2026
25 checks passed
@rholshausen
rholshausen deleted the feat/verifier-cli-retries branch May 27, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants